import { OrderConfirm } from '@/types/orderConfirm'
import { Product } from '@/types/product'
import React, { FC } from 'react'
import Welfare from './welfare'
interface GoodsParam {
  product: Product
}
const empty: FC<GoodsParam> = (props) => {
  const data = props.product
  return (
    <div className="w-full bg-white  shadow-bs5 rounded-r0.8  mb-r1.2 overflow-hidden ">
      {!!data.courseTimeConflictInfo.hasConflict ? (
        <div className="  pl-r1.2 pr-r1.2 relative  font-regular font-normal text-r1.2 text-orange-FF9D00 bg-orange-FFF5E8 h-r2.9 leading-r2.9">
          <span>
            <i className="iconfont icon-icon_state_warning  text-r1.2 mr-r0.4"></i>
          </span>
          <span>{data.courseTimeConflictInfo.text}</span>
        </div>
      ) : (
        ''
      )}
      <div className=" pl-r1.2 pr-r1.2  pt-r1.2  pb-r0.5  ">
        <div className="w-full text-gray-333333 text-r1.4 font-medium relative">
          <span className=" text-white bg-orange-DCAF80 font-normal text-r1.2  h-r1.6 w-r2.8 text-center rounded-r0.2 inline-block mr-r0.4">
            {data.subject_name}
          </span>
          <span className=" leading-r2.2">{data.course_name}</span>
          <span className=" leading-r2.2 absolute right-2 ">¥{data.price}</span>
        </div>
        <div className=" mt-r1.2 mb-r1.2 text-gray-666666 font-normal font-regular">
          {data.schooltime_name} ·共{data.total_sections}讲
        </div>
        <div className=" mt-r1.2 mb-r1.2 text-gray-666666  font-normal font-regular">
          <span>
            {data.main_teacher.map((val, key) => (
              <span key={key} className="mr-0.5">
                {val.title}：{val.teacher_name}
              </span>
            ))}
          </span>
          <span>
            {' '}
            {data.counselor_teacher.map((val, key) => (
              <span key={key} className="mr-0.5">
                {val.title}：{val.teacher_name}
              </span>
            ))}
          </span>
        </div>
        <Welfare
          goodsData={data.buygift_detail?.goodsData}
          othersData={data.buygift_detail?.othersData}
        ></Welfare>
      </div>
    </div>
  )
}
export default empty
